Skip to content

Conversation

@cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Sep 12, 2023

Supersedes #485. Here's a hello world example.

library(shiny)
library(bslib)

ui <- page_fixed(
    input_check_buttons("x", state.name[1:3], selected = state.name[1:3]),
    input_radio_buttons("y", state.name[1:3]),
    input_check_buttons("z", state.name[1:10], gap = 8)
)
server <- function(input, output, session) {
    observe({
        print(input$x)
        print(input$y)
        print(input$z)
    })
}

shinyApp(ui, server)

TODO

  • Wrap JS logic up into web component
  • Add a label argument?
  • Support size = c("sm", "md", "lg")?
  • How to specify (require?) aria-label
  • We need some way of doing grid layout (i.e., wrap buttons onto new "lines" after x columns).
    • See layout_column_wrap() for inspiration
  • Do we need to tell shiny not to bind to the inputs?

Maybe TODO

  • Support dropdowns?
  • Should we support I("all")/I("none")? Take inspiration from radioButtons()/checkboxGroupInput()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants